#ifndef __TYPE_DEF_H__
#define __TYPE_DEF_H__

#include <cstdlib>
#include <cstddef>
#include <cstdint>
#include <cassert>

#ifdef UNIX
typedef unsigned char uint8_t;
typedef signed char int8_t;
typedef unsigned short uint16_t;
typedef signed short int16_t;
typedef unsigned int uint32_t;
typedef int int32_t;
typedef unsigned long long uint64_t;
typedef long long int64_t;
#endif

typedef uint8_t uint8;
typedef int8_t int8;

typedef uint16_t uint16;
typedef int16_t int16;

typedef uint32_t uint32;
typedef int32_t int32;

typedef uint8 byte;


#define SAFE_DELETE(p) if(p != NULL){delete p; p = NULL;}
#define SAFE_FREE(p) if(p != NULL){ free(p); p = NULL;}
#define SAFE_DELETE_ARRAY(p) if(p!= NULL){delete []p; p = NULL;}

#define thread_local 

//#define UNIX

//#define ASSERT(s) assert(s)
#define ASSERT(s)

#endif
